Accessing VA Reports with Parameterized URLs

4

The SAS Visual Analytics 7.2 release introduced context sensitive URLs for VA reports which means we can now directly pass parameter values in the URLs! This opens the door and allows for greater flexibility when needing to use a URL to access a VA report.

One use would be if you want to include a direct URL with particular parameter values in a third-party portal or custom application. Another use could be distributing different URLs with varying parameter values depending on the user’s Region interest or Product interest and allowing that person to save the URL as a link in the Hub. That way, no matter what values are used to save the report, the user will always open the report with their region and/or product selected.

Let’s look at what needs to be in place.

Configure Parameters

All parameters require a control object so that the user can select a value for the parameter. For additional information on the supported control objects for parameters please check out my Using parameters in SAS Visual Analytics blog. The optional role is the Category or Measure role. This role determines if the control object will give the user a pre-determined list of available values depending on the type of control object used.

Here are some examples:

Button Bar
On the Roles tab, I assigned Facility Region to the Category role which results in the button bar displaying the available Regions, i.e. East, North, South and West. Then I assigned the Region Parameter to the Parameter role. This means that the choice of the button bar will be stored in the Parameter named Region_Parameter, notice that a character parameter does not require a current (or default) value.

Parameter1
Parameter2

Slider
On the Roles tab, I assigned Unit_Yield_Multiplier_Parameter to the Parameter role. I did not assign a measure to the Measure/Date role because I wanted the parameter’s minimum and maximum values to drive the available values of the slider. Notice that a numeric parameter requires a minimum, maximum and current (or default) value.

Parameter3

Build URL
Now that we have our parameters in place we can build the VA report URL. There are two styles of URLs, one with the VA Viewer banner and one without the banner. If not already logged into VA, the user will be prompted for credentials when the URL is clicked. To by-pass a log in, there are Guest Access URLs which will not prompt for credentials but then the user is restricted to the Guest Access VA Viewer role capabilities.

Parameter4

Here are the base URLs:
With Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?

For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/guest.jsp?

 

Without Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportViewOnly=true&

For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer_guest.jsp?

 

Here are the parameters used to populate a fully qualified VA report URL:

  • reportName
  • reportPath
  • name value pair for Parameter1 …
  • name value pair for ParameterN

Here is an example of using the base URL with the VA banner and plugging in the parameters:

http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?
reportName=report%20name&reportPath=metadata%20location&Parameter1=value&Parameter2=value

How to populate these base URLs with the report name, report path and parameters? Let VA do some of the work for you! From VA Designer, select File then E-mail… this will bring up a window with a generic URL to the VA report.

Parameter5

This URL will have the full path to the report already encoded for us. Look at the value after the location parameter.

http://sasserver05.race.sas.com:7980/SASVisualAnalytics/report?location=%2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports%2FReport%20-%20Parameters&type=Report.BI&section=vi1

We can pull out two of the URL parameters we need from the location parameter. This gives us:

reportName = Report%20-%20Parameters
reportPath = %2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports%2F

 

Next, we need to select the report’s parameter name value pairs we want to use.

Region_Parameter = North
Unit_Yield_Multiplier_Parameter = 1.2

Putting it all together in the banner URL gives us:

http://sasserver05.race.sas.com:7980//SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportName=Report%20-%20Parameters&reportPath=%2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports&Region_Parameter=North&Unit_Yield_Multiplier_Parameter=1.2

 

Now you can adjust the values of your parameters and distribute this custom VA report URL as desired.

Some considerations to keep in mind include:

  • Cannot pass a prompt or control object value alone, each control object must have a parameter associated with its Parameter Role
  • Only supports available parameter type and control object combinations, i.e. no multiple selection control objects or date values

For additional information on the supported control objects for parameters please check out my Using parameters in SAS Visual Analytics blog.

Share

About Author

Teri Patsilaras

Senior Manager

Teri Patsilaras is a Senior Manager in the Global Enablement and Learning (GEL) Team within SAS R&D's Technology Transfer and Governance Division. Teri works to enable SAS technologists on the latest data visualization techniques and how to leverage SAS Visual Analytics to meet customer needs. She has extensive knowledge of report design methodologies and how to efficiently and effectively apply data visualization methods.

4 Comments

  1. Hi Teri,

    I like your blog and are getting some good tips.

    One question : with this work with https ? I'm trying to get this working and have followed your instructions and the parameter just doesn't seem to make it to the report.

    thanks
    Mark

    • I am experiencing the same thing. the report opens fine, but the parameters to the report do not appear to be recognized.

      Any help would be appreciated

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top